﻿using System.Collections.Generic;
using ControleRepresentante.Logic.Models;
using WebSite.ViewModels.Fields;

namespace WebSite.ViewModels.EditViewModels
{
    public class FabricaEditViewModel : DetailsHolderEditViewModel
    {
        public FabricaEditViewModel()
            : base("Fábrica")
        {
        }

        protected override IEnumerable<IField> GetGeralFields()
        {
            Fabrica fabrica = (Fabrica) Model;

            List<IField> result = new List<IField>
            {
                new TextBoxField("Nome", "nome", fabrica.Nome, true),
                new TextBoxField("CNPJ", "cnpj", fabrica.CNPJ, true),
                new TextBoxField("Inscrição Estadual", "inscricaoEstadual", fabrica.InscricaoEstadual, true),
            };
            result.AddRange(base.GetGeralFields());
            return result;
        }
    }
}